let v = new Vue({
    el:'#main-controller',
    data:{
        deptList:[],
    },
    methods:{
        initPage:function () {
            axios({
                url:'main/dept/getDeptList',
            }).then(resp => {
                this.deptList = resp.data.obj;
                for(let i = 0;i < this.deptList.length;i++){
                    this.deptList[i].a = '#deptDetail' + (i+1);
                    this.deptList[i].tagId = 'deptDetail' + (i+1);
                }
            }).catch(error => {
                layer.msg(error.message);
            })
        },
        toDetail:function (thisUser) {
            layer.obj = thisUser;
            if(thisUser.isSecret == 0){
                layer.msg("该用户设置了私密信息，不可查看");
            }else{
                layer.open({
                    type: 2,
                    title: '详细信息',
                    area: ['80%', '80%'],
                    content: 'main/user/toDetail',
                    end:() => {

                    }
                })
            }

        },
    },

    created:function () {
        this.initPage();
    }
})
